Is it possible to delete a trigger without opening the module it applies to?..I may have written a post open trigger on a module that is causing doors to stop responding and crash. This is a hypothetical question of course.
Thanks!
SystemAdmin - Wed Aug 17 17:07:02 EDT 2011 |
|
Re: Delete trigger without opening module SystemAdmin - Thu Aug 18 01:03:21 EDT 2011
Might be possible.
But yuo can also start your DOORS client without any triggers by using the -T command line switch. You have to be a Database Manager for this to work.
|
|
Re: Delete trigger without opening module llandale - Thu Aug 18 16:11:01 EDT 2011
That has never happened to me dozens of times hypothetically.
You can do Pekka's easy and effective solution to then delete the Trigger; or you can get REALLY carried away: Have a post-module-open Trigger installed in the Database that has priority 1. This trigger will fire first, and it can then search for and remove the other trigger.
You could also effectively disable the trigger by looking at its code and defining in the top context some overloaded system command it uses to "halt". So if it calls "get" you can put the same "get" in the top context with evalTop_, and your "get" just "halts", thus stopping the trigger.
You could also install these triggers in the Project and have the Trigger itself decide if the current Module qualifies.
|
|
Re: Delete trigger without opening module Mathias Mamsch - Thu Aug 18 18:01:32 EDT 2011 llandale - Thu Aug 18 16:11:01 EDT 2011
That has never happened to me dozens of times hypothetically.
You can do Pekka's easy and effective solution to then delete the Trigger; or you can get REALLY carried away: Have a post-module-open Trigger installed in the Database that has priority 1. This trigger will fire first, and it can then search for and remove the other trigger.
You could also effectively disable the trigger by looking at its code and defining in the top context some overloaded system command it uses to "halt". So if it calls "get" you can put the same "get" in the top context with evalTop_, and your "get" just "halts", thus stopping the trigger.
You could also install these triggers in the Project and have the Trigger itself decide if the current Module qualifies.
;-) Or you could just delete the 'triggers.dtc' file on the database repository while we are talking about getting 'carried away' ... Regards, Mathias
|
|
Re: Delete trigger without opening module SystemAdmin - Thu Aug 18 18:47:20 EDT 2011 Mathias Mamsch - Thu Aug 18 18:01:32 EDT 2011
;-) Or you could just delete the 'triggers.dtc' file on the database repository while we are talking about getting 'carried away' ... Regards, Mathias
Thanks for the help guys! I was in a dummy prototype and had a copy of the module from about an hour before I killed it so I ended up just deleting it and making a new copy but I will keep these in mind in for future reference.
-Adam
|
|
Re: Delete trigger without opening module llandale - Fri Aug 19 15:41:15 EDT 2011 Mathias Mamsch - Thu Aug 18 18:01:32 EDT 2011
;-) Or you could just delete the 'triggers.dtc' file on the database repository while we are talking about getting 'carried away' ... Regards, Mathias
Yes, I suppose "I" could delete that file. But I believe in honoring the service contract and would never ever ever ever do anything to jeopardize that. And its definately has NOTHING to do with my excessive paranoia about playing with "unloaded" guns; nor how many times I've required a complete production database restore.
I suppose "you" could actually precision-edit that file and extract just the offending trigger, leaving the others in place. Or at least corrupt it so it gets DXL errors and therefore doesn't run.
My cleverness ends at the inside edge of the box; and yours starts at the outside edge.
|
|
Re: Delete trigger without opening module rahul281 - Wed Sep 25 07:24:10 EDT 2013 llandale - Fri Aug 19 15:41:15 EDT 2011
Yes, I suppose "I" could delete that file. But I believe in honoring the service contract and would never ever ever ever do anything to jeopardize that. And its definately has NOTHING to do with my excessive paranoia about playing with "unloaded" guns; nor how many times I've required a complete production database restore.
I suppose "you" could actually precision-edit that file and extract just the offending trigger, leaving the others in place. Or at least corrupt it so it gets DXL errors and therefore doesn't run.
My cleverness ends at the inside edge of the box; and yours starts at the outside edge.
can u provide me the code to delete the triggers in a module
|
|
Re: Delete trigger without opening module llandale - Wed Sep 25 12:39:40 EDT 2013 rahul281 - Wed Sep 25 07:24:10 EDT 2013
can u provide me the code to delete the triggers in a module
-
Trigger trg
-
string Name
-
for trg in current Module do
-
{ Name = name(trg)
-
if (confirm("Delete trigger [" Name "] ??")) then delete(trg)
-
}
|
|